package com.happy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

@TableName("category_info")
public class CategoryEntity extends BaseEntity {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("categoryName")
    private String categoryName;

    @TableField("parentId")
    private Integer parentId;
    @TableField(exist = false)
    private String parentName;

    @TableField("createTime")
    private Date createTime;

    @TableField("changeTime")
    private Date changeTime;

    @TableField("isUsed")
    private Integer isUsed;

    public Integer getId () {
        return id;
    }

    public void setId (Integer id) {
        this.id = id;
    }

    public String getCategoryName () {
        return categoryName;
    }

    public void setCategoryName ( String categoryName ) {
        this.categoryName = categoryName;
    }

    public Integer getParentId () {
        return parentId;
    }

    public void setParentId ( Integer parentId ) {
        this.parentId = parentId;
    }

    public String getParentName () {
        return parentName;
    }

    public void setParentName ( String parentName ) {
        this.parentName = parentName;
    }

    public Date getCreateTime () {
        return createTime;
    }

    public void setCreateTime ( Date createTime ) {
        this.createTime = createTime;
    }

    public Date getChangeTime () {
        return changeTime;
    }

    public void setChangeTime ( Date changeTime ) {
        this.changeTime = changeTime;
    }

    public Integer getIsUsed () {
        return isUsed;
    }

    public void setIsUsed (Integer isUsed) {
        this.isUsed = isUsed;
    }

    @Override
    public String toString () {
        return "CategoryEntity{" +
                "id=" + id +
                ", categoryName='" + categoryName + '\'' +
                ", parentId=" + parentId +
                ", createTime='" + createTime + '\'' +
                ", changeTime='" + changeTime + '\'' +
                ", isUsed=" + isUsed +
                '}';
    }
}
